﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Data;
using System.Data.SqlClient;
using GPSTracker.Helper;
using System.Text;

namespace GPSTracker.Views.DAL
{
    public class DeliveryEntryDAL
    {
        public DataTable FillWarehouseMaster()
        {
            var sb = new StringBuilder();
            var dt = new DataTable();

            var strSQL = "SELECT * FROM VW_GetWarehouse ";
            var da = new SqlDataAdapter(strSQL, CommonFx.GetSqlCon());
            da.Fill(dt);

            return dt;
        }

        public DataTable FillBranchMaster()
        {
            var sb = new StringBuilder();
            var dt = new DataTable();

            var strSQL = "SELECT * FROM VW_GetBranch ";
            var da = new SqlDataAdapter(strSQL, CommonFx.GetSqlCon());
            da.Fill(dt);

            return dt;
        }

        public DataTable FillAreaMaster()
        {
            var sb = new StringBuilder();
            var dt = new DataTable();

            var strSQL = "SELECT * FROM VW_GetArea ";
            var da = new SqlDataAdapter(strSQL, CommonFx.GetSqlCon());
            da.Fill(dt);

            return dt;
        }
    }
}
